package com.example.hello;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;

public class OrdermenuSQliteHelper extends SQLiteOpenHelper {
	static final private String DROP_TABLE = "drop table menulist;";
	static final private int version = 1;
	static final private String DBNAME = "menu.sqlite";
	
	public OrdermenuSQliteHelper(Context context) {
		super(context, DBNAME, null, version);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		db.execSQL("CREATE TABLE menulist " +
				"(menu_category TEXT PRIMARY KEY, menu TEXT, price INTEGER)");
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		 db.execSQL(DROP_TABLE);
	        onCreate(db);
	}

}
